<div class="salesDetails view">
<h2><?php echo __('Sales Detail'); ?></h2>
	<dl>
		<dt><?php echo __('Id'); ?></dt>
		<dd>
			<?php echo h($salesDetail['SalesDetail']['id']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Sale'); ?></dt>
		<dd>
			<?php echo $this->Html->link($salesDetail['Sale']['id'], array('controller' => 'sales', 'action' => 'view', $salesDetail['Sale']['id'])); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Modell'); ?></dt>
		<dd>
			<?php echo $this->Html->link($salesDetail['Modell']['id'], array('controller' => 'modells', 'action' => 'view', $salesDetail['Modell']['id'])); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Quantity'); ?></dt>
		<dd>
			<?php echo h($salesDetail['SalesDetail']['quantity']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Price'); ?></dt>
		<dd>
			<?php echo h($salesDetail['SalesDetail']['price']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Discount For Item'); ?></dt>
		<dd>
			<?php echo h($salesDetail['SalesDetail']['discount_for_item']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Retail Price'); ?></dt>
		<dd>
			<?php echo h($salesDetail['SalesDetail']['retail_price']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Total'); ?></dt>
		<dd>
			<?php echo h($salesDetail['SalesDetail']['total']); ?>
			&nbsp;
		</dd>
	</dl>
</div>
<div class="actions">
	<h3><?php echo __('Actions'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('Edit Sales Detail'), array('action' => 'edit', $salesDetail['SalesDetail']['id'])); ?> </li>
		<li><?php echo $this->Form->postLink(__('Delete Sales Detail'), array('action' => 'delete', $salesDetail['SalesDetail']['id']), array(), __('Are you sure you want to delete # %s?', $salesDetail['SalesDetail']['id'])); ?> </li>
		<li><?php echo $this->Html->link(__('List Sales Details'), array('action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Sales Detail'), array('action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Sales'), array('controller' => 'sales', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Sale'), array('controller' => 'sales', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Modells'), array('controller' => 'modells', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Modell'), array('controller' => 'modells', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Products'), array('controller' => 'products', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Product'), array('controller' => 'products', 'action' => 'add')); ?> </li>
	</ul>
</div>
<div class="related">
	<h3><?php echo __('Related Products'); ?></h3>
	<?php if (!empty($salesDetail['Product'])): ?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php echo __('Id'); ?></th>
		<th><?php echo __('Warehouse Id'); ?></th>
		<th><?php echo __('Purchase Detail Id'); ?></th>
		<th><?php echo __('Sales Detail Id'); ?></th>
		<th><?php echo __('Modell Id'); ?></th>
		<th><?php echo __('Serial Number'); ?></th>
		<th class="actions"><?php echo __('Actions'); ?></th>
	</tr>
	<?php foreach ($salesDetail['Product'] as $product): ?>
		<tr>
			<td><?php echo $product['id']; ?></td>
			<td><?php echo $product['warehouse_id']; ?></td>
			<td><?php echo $product['purchase_detail_id']; ?></td>
			<td><?php echo $product['sales_detail_id']; ?></td>
			<td><?php echo $product['modell_id']; ?></td>
			<td><?php echo $product['serial_number']; ?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View'), array('controller' => 'products', 'action' => 'view', $product['id'])); ?>
				<?php echo $this->Html->link(__('Edit'), array('controller' => 'products', 'action' => 'edit', $product['id'])); ?>
				<?php echo $this->Form->postLink(__('Delete'), array('controller' => 'products', 'action' => 'delete', $product['id']), array(), __('Are you sure you want to delete # %s?', $product['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New Product'), array('controller' => 'products', 'action' => 'add')); ?> </li>
		</ul>
	</div>
</div>
